CREATE TABLE [dbo].[tb_ConceptosDeLiquidacion]
(
[idConceptoLiquidacion] [int] NOT NULL IDENTITY(1, 1),
[Descripcion] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[RegimenLaboral] [int] NOT NULL,
[Mnemo] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Habilitado] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Tipo] [int] NOT NULL,
[TipoAfiliacionInvolucrada] [int] NULL,
[Desde] [datetime] NOT NULL,
[Hasta] [datetime] NULL,
[OrdenDeEjecucion] [int] NOT NULL,
[OrdenDeImpresion] [int] NOT NULL,
[SeAplicaAlAjente] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[AfectaProporcionalDias] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ExigeCertificado] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[NormaDeAval] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[EsAjuste] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[EsDescuentoExt] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[EsEmbargo] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[PartidaPresupuestaria] [int] NULL,
[ImputacionContable] [int] NULL,
[MesDePago] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[MesDePagoSuplentes] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Procedimiento] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MostrarEnPlanilla] [bit] NULL,
[MomentoDeEjecucion] [int] NOT NULL,
[ConceptoATotalizar] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_ConceptosDeLiquidacion] ADD CONSTRAINT [PK_tb_ConceptosDeLiquidacion] PRIMARY KEY NONCLUSTERED  ([idConceptoLiquidacion]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_ConceptosDeLiquidacion] WITH NOCHECK ADD CONSTRAINT [FK_tb_ConceptosDeLiquidacion_tb_MomentosDeEjecucion] FOREIGN KEY ([MomentoDeEjecucion]) REFERENCES [dbo].[tb_MomentosDeEjecucion] ([IdMomentoDeEjecucion])
GO
ALTER TABLE [dbo].[tb_ConceptosDeLiquidacion] WITH NOCHECK ADD CONSTRAINT [FK_tb_ConceptosDeLiquidacion_tb_PartidasPresupuestarias] FOREIGN KEY ([PartidaPresupuestaria]) REFERENCES [dbo].[tb_PartidasPresupuestarias] ([idPartida])
GO
ALTER TABLE [dbo].[tb_ConceptosDeLiquidacion] WITH NOCHECK ADD CONSTRAINT [FK_tb_ConceptosDeLiquidacion_tb_RegimenLaboral] FOREIGN KEY ([RegimenLaboral]) REFERENCES [dbo].[tb_RegimenLaboral] ([idRegimenLaboral])
GO
ALTER TABLE [dbo].[tb_ConceptosDeLiquidacion] WITH NOCHECK ADD CONSTRAINT [FK_tb_ConceptosDeLiquidacion_tb_TiposDeConceptosDeLiquidacion] FOREIGN KEY ([Tipo]) REFERENCES [dbo].[tb_TiposDeConceptosDeLiquidacion] ([IdTipoDeConceptoDeLiquidacion])
GO
ALTER TABLE [dbo].[tb_ConceptosDeLiquidacion] WITH NOCHECK ADD CONSTRAINT [FK_tb_ConceptosDeLiquidacion_tb_TiposDeAfiliaciones] FOREIGN KEY ([TipoAfiliacionInvolucrada]) REFERENCES [dbo].[tb_TiposDeAfiliaciones] ([idTipoAfiliacion])
GO
